import { createApp } from 'vue'
import App from './App.vue'
import router from "@/router"
import pinia from "@/store";
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'element-plus/dist/index.css'
// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import "@/assets/style/index.scss"

const app = createApp(App)

// element图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 表单组件
import Form from "./components/Form/index"
// 通用组件
import Ui from "./components/Ui/index"
// 列表组件
import Page from "./components/Page/index"
// 页面组件
import Table from "./components/Table/index"

// 指令
import directive from "./directive/index"



app.use(router)
    .use(pinia)
    .use(ElementPlus,{
        locale: zhCn,
    })
    .use(Form)
    .use(Ui)
    .use(Page)
    .use(Table)
    .use(directive)
    .mount('#app')

